﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using DungeonCraft.Engine.Interfaces;
using DungeonCraft.DataModel;

namespace DungeonCraft.Views
{
    public class PlayerView : AView<Player>
    {
        public PlayerView(IRenderer iRenderer, IAnimationManager iAnimationManager)
            : base(iRenderer, iAnimationManager)
        {
        }

        public override void Draw(Player target)
        {
            if (!target.Dead)
            {
                renderer.DrawSprite(target.Sprite, target.Location.X, target.Location.Y, target.Width, target.Height, animationManager.GetCurrentPlayerAnimationFrame(target), Color.White);
                renderer.DrawSprite(target.Sprite, target.Location.X, target.Location.Y, 1, 1, animationManager.GetCurrentPlayerAnimationFrame(target), Color.Red);
            }
            else
            {
                renderer.DrawSprite(target.Sprite, target.Location.X, target.Location.Y, target.Width, target.Height, animationManager.GetCurrentPlayerAnimationFrame(target), Color.Red);
            }

        }
    }
}
